home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
presto
/
presto10.lha
/
src
/
debug.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-12-11
|
446b
|
29 lines
#include "presto.h"
int debug_level = 10;
Spinlock debug_lock;
//int debug_lock = 0;
dstream dout(10);
dstream::dstream (int print_level, int flush)
{
d_print_level = print_level;
d_flush = flush;
}
void
dstream::operator<< (char* s)
{
//#ifdef debug
if (debug_level >= d_print_level) {
debug_lock.lock();
// s_lock(&debug_lock);
cout << s;
if (d_flush) cout.flush();
debug_lock.unlock();
// s_unlock(&debug_lock);
}
//#endif
}